ballistic pendulum equation